package com.sogou.qadev.service.login.client.product;

public class ProductProxy implements com.sogou.qadev.service.login.client.product.Product {
  private String _endpoint = null;
  private com.sogou.qadev.service.login.client.product.Product product = null;
  
  public ProductProxy() {
    _initProductProxy();
  }
  
  private void _initProductProxy() {
    try {
      product = (new com.sogou.qadev.service.login.client.product.ProductServiceLocator()).getProduct();
      if (product != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)product)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)product)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (product != null)
      ((javax.xml.rpc.Stub)product)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.sogou.qadev.service.login.client.product.Product getProduct() {
    if (product == null)
      _initProductProxy();
    return product;
  }
  
  public long addProduct(long keyId, java.lang.String productName) throws java.rmi.RemoteException{
    if (product == null)
      _initProductProxy();
    return product.addProduct(keyId, productName);
  }
  
  public boolean removeProduct(long keyId, long productId) throws java.rmi.RemoteException{
    if (product == null)
      _initProductProxy();
    return product.removeProduct(keyId, productId);
  }
  
  public long addProductUser(long keyId, long productId, java.lang.String username, int popedom) throws java.rmi.RemoteException{
    if (product == null)
      _initProductProxy();
    return product.addProductUser(keyId, productId, username, popedom);
  }
  
  public boolean removeProductUser(long keyId, long productId, long userId, int popedom) throws java.rmi.RemoteException{
    if (product == null)
      _initProductProxy();
    return product.removeProductUser(keyId, productId, userId, popedom);
  }
  
  public long addProductGroup(long keyId, long productId, java.lang.String groupName, int popedom) throws java.rmi.RemoteException{
    if (product == null)
      _initProductProxy();
    return product.addProductGroup(keyId, productId, groupName, popedom);
  }
  
  public boolean removeProductGroup(long keyId, long productId, long groupId, int popedom) throws java.rmi.RemoteException{
    if (product == null)
      _initProductProxy();
    return product.removeProductGroup(keyId, productId, groupId, popedom);
  }
  
  public boolean renameProduct(long keyId, long productId, java.lang.String newProductName) throws java.rmi.RemoteException{
    if (product == null)
      _initProductProxy();
    return product.renameProduct(keyId, productId, newProductName);
  }
  
  public com.sogou.qadev.service.login.bean.Product queryProduct(long keyId, long productId) throws java.rmi.RemoteException{
    if (product == null)
      _initProductProxy();
    return product.queryProduct(keyId, productId);
  }
  
  public com.sogou.qadev.service.login.bean.Product[] queryProducts(long keyId, long userId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (product == null)
      _initProductProxy();
    return product.queryProducts(keyId, userId, lines, pageNumber);
  }
  
  public com.sogou.qadev.service.login.bean.Product[] queryUserProducts(long keyId, long userId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (product == null)
      _initProductProxy();
    return product.queryUserProducts(keyId, userId, lines, pageNumber);
  }
  
  public com.sogou.qadev.service.login.bean.Product[] queryGroupProducts(long keyId, long groupId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (product == null)
      _initProductProxy();
    return product.queryGroupProducts(keyId, groupId, lines, pageNumber);
  }
  
  
}